package com.ruibang.glass.quality.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.ruibang.glass.common.utils.validateannotation.NotBlank;
import com.ruibang.glass.quality.domain.resp.GrindData;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 成品离线检测-研磨幅
 * </p>
 *
 * @author songJinKang
 * @since 2024-03-20
 */

@ApiModel(value = "成品离线检测-研磨幅")
@TableName(value = "g_quality_grind_range", autoResultMap = true)
@Data
public class GrindRange extends BaseEntity {
    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;
    @ApiModelProperty(value = "玻璃ID")
    @NotBlank(message = "玻璃ID不可为空")
    private String glassId;
    @ApiModelProperty(value = "产品型号(1:G8.5,2:G8.6,3:G8.6+,4:G8.7)")
    @NotBlank(message = "产品型号不可为空")
    private String glassModel;
    @ApiModelProperty(value = "测定日期")
    @NotBlank(message = "测定日期不可为空")
    private String measureDate;
    @ApiModelProperty(value = "抽检时间")
    @NotBlank(message = "抽检时间不可为空")
    private String checkTime;
    @ApiModelProperty(value = "所属产线名称")
    private String productLineName;
    @ApiModelProperty(value = "所属产线名称")
    @TableField(value = "product_line_id")
    private String productLine;
    @ApiModelProperty(value = "测量人用户ID")
    private String userId;
    @ApiModelProperty(value = "测量人名称")
    private String userName;
    @ApiModelProperty(value = "判定(合格:0,不合格:1)")
    @NotBlank(message = "判定不可为空")
    private String decide;
    @ApiModelProperty(value = "品级：A，B，C")
    @NotBlank(message = "品级不可为空")
    private String grade;
    @ApiModelProperty(value = "最大")
    @NotNull(message = "最大值不可为空")
    private Integer max;
    @ApiModelProperty(value = "最小")
    @NotNull(message = "最小值不可为空")
    private Integer min;
    @ApiModelProperty(value = "最大移动极差")
    @NotNull(message = "最大移动极差不可为空")
    private Integer maxRange;
    @ApiModelProperty(value = "备注")
    private String note;
    @ApiModelProperty(value = "文件ID")
    @TableField(exist = false)
    private List<String> fileIds;
    @ApiModelProperty(value = "取样数据")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<GrindData> grindData;
    @ApiModelProperty(value = "编辑时删除图片Id列表")
    @TableField(exist = false)
    private List<String> deleteFileIds;
    @ApiModelProperty("是否删除：1：是 0：否")
    @ExcelIgnore
    @TableLogic
    private String isDelete;
    @ApiModelProperty("上传的文件ID")
    @TableField(exist = false)
    private String upLoadFileId;

}
